#ifndef WATERCRAFT_SPLEEF_H
#define WATERCRAFT_SPLEEF_H 1

#include "SDL/SDL.h"
#include <cstdio>
#include <set>
#include "server.h"
#include "level.h"

class Server;

class Spleef
{
	public:
		Spleef();
		~Spleef(){};
		
		void activate();
		void set_phase();
		
		void update(Server* server);
		
		void add_player(int id);
		bool can_join();
		void set_phase(int p);
		
	private:
		short x,y,z, w, h, d;
		short bx, by, bz, bw, bh, bd; //waiting box
		
		std::set<char> players;
		
		bool active;
		int tick;
		int phase, next_phase; // 0 waiting for players. 1 lockdown. 2 playing. 3 game over, restarting. 
};

#endif
